package com.miaosha.ms_01.result;

/**
 * @author hezhaoxiang
 * @Description //异常返回对象
 * @Date 10:19 2020/9/13
 **/
public class CodeMsg {

    private int code;

    private String msg;

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public static CodeMsg  SUCCESS = new CodeMsg(ResultEnum.RESULT_SUCCESS.getCode(),ResultEnum.RESULT_SUCCESS.getMsg());
    public static CodeMsg  SERVER_ERR = new CodeMsg(ResultEnum.RESULT_ERR_500.getCode(),ResultEnum.RESULT_ERR_500.getMsg());

    public CodeMsg(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
